﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Randata.Test
{
    [TestClass]
    public class StringTest
    {

        [TestMethod]
        public void StringDataProvider_Should_work()
        {
            String s = DataProvider.Any<String>();
        }

        [TestMethod]
        public void StringDataProvider_Should_not_be_null_or_empty()
        {
            String s = DataProvider.Any<String>();

            Assert.IsFalse(String.IsNullOrWhiteSpace(s), "Shouldn't be null or empty.");
        }

        [TestMethod]
        public void StringDataProvider_Should_give_diferent_values()
        {
            String s1 = DataProvider.Any<String>();

            String s2 = DataProvider.Any<String>();

            Assert.AreNotEqual(s1, s2, "The values must to be diferents.");
        }

        [TestMethod]
        public void StringDataProvider_Should_not_be_just_numbers()
        {
            String s = DataProvider.Any<String>();
            
            double aux;
            bool isNumber = double.TryParse(s, out aux);

            Assert.IsFalse(isNumber, "The value is not supost to be just numbers.");
        }

    }
}
